package com.example.android_practice.lifeCycle;

import android.text.NoCopySpan;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;

import com.yaoyanshe.trialfield.common.utils.YLogger;

/**
 * Created by tangcan on 20/9/26.
 * 修改人：tangcan
 * 修改时间：20/9/26 下午3:53
 * 修改备注：
 */
public class ApplicationObserver implements LifecycleObserver {

    private String TAG=this.getClass().getName();

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    public void onCreate(){
        YLogger.d("lifecycle onCreate");
    }


    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    public void onStart(){
        YLogger.d("lifecycle.onstart()");
    }


    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public void onResume(){
        YLogger.d("lifecycle.onResume()");
    }


    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    public void onPause(){
        YLogger.d("lifecycle.onPause()");
    }


    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    public void onStop(){
        YLogger.d("lifecycle.onStop()");
    }



    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    public void onDestroy(){
        YLogger.d("lifecycle.onDestroy()");
    }


}
